import { request } from "./request"

export default {

    login: (name, pwd) => {
        return request({
            url: '/snsoft_guanyang/pda/pdaLogin.jsp?name=' + name + "&pwd=" + pwd,
            data: {},
            isLogin: true,
            method: 'GET'
        })
    },
    getWname: (token) => {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=getWname',
            data: { token },
            method: 'POST'
        })
    },
    getProductType: () => {
        return request({
            url: '/snsoft_guanyang/pda/pdaget.jsp?type=refGcode',
            data: {},
            method: 'GET'
        })
    },

    /**
     * 获取堆场
     */
    getDuichang: () => {
        return request({
            url: '/snsoft_guanyang/pda/pdaget.jsp?type=refScode',
            data: {},
            method: 'GET'
        })
    },
    /**
     * 提交入库
     */
    postConfirmIn(reqRuku) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=confirmIn',
            data: reqRuku,
            method: 'POST',
            outErrMsg: true
        })
    },

    /**
     * 查询库存
     */
    getKuCun(param) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=warehouseInfo',
            data: param,
            method: 'POST'
        })
    },

    getChuCangTongZhiDan() {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=outNoticeList',
            data: {},
            method: 'POST'

        })
    },
    getChuCangTongZhiDan_DaiChuCang(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=toBeOutNotice',
            data: { checkicode },
            method: 'POST',
            noLoading: true
        })
    },
    getChuCangTongZhiDan_YiChuCang(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=outNoticeAlready',
            data: { checkicode },
            method: 'POST',
            noLoading: true
        })
    },

    getChuCangTongZhiDan_Saoma(wcode, skuno, checkicode, sdate) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=scanOutNotice',
            data: { wcode, skuno, checkicode, sdate },
            method: 'POST'
        })
    },
    getPeiZaiJianHuo() {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=outList',
            data: {},
            method: 'POST'
        })
    },

    getPeiZaiJianHuo_DaiSaoMa(ioicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=toBeOut',
            data: { ioicode },
            method: 'POST',
            noLoading: true
        })
    },

    getPeiZaiJianHuo_YiSaoMa(ioicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=outAlready',
            data: { ioicode },
            method: 'POST',
            noLoading: true
        })
    },
    getPeiZaiJianHuo_Saoma(wcode, skuno, ioicode, sdate) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=scanOut',
            data: { wcode, skuno, ioicode, sdate },
            method: 'POST',

        })
    },


    //移仓入仓单

    getYiCangDanRu() {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=moveInList',
            data: {},
            method: 'POST'
        })
    },

    getYiCangDanRu_DaiSaoMa(ioicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=toBeMoveIn',
            data: { ioicode },
            method: 'POST',
            noLoading: true
        })
    },

    getYiCangDanRu_YiSaoMa(ioicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=moveInAlready',
            data: { ioicode },
            method: 'POST',
            noLoading: true
        })
    },

    getYiCangDanRu_Saoma(wcode, skuno, ioicode, sdate, sub_fld4) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=scanMoveIn',
            data: { wcode, skuno, ioicode, sdate, sub_fld4 },
            method: 'POST',

        })
    },

    //
    //移仓出仓单

    getYiCangDanChu() {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=moveList',
            data: {},
            method: 'POST'
        })
    },

    //moveListstack

    getYiCangDanChu_DuoWei(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=moveListstack',
            data: { checkicode },
            method: 'POST'
        })
    },


    getYiCangDanChu_DaiSaoMa(checkicode, scode, sub_fld4,busiinvcode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=toBeMove',
            data: { checkicode, scode, sub_fld4,busiinvcode },
            method: 'POST',
            noLoading: true
        })
    },

    getYiCangDanChu_YiSaoMa(checkicode, scode, sub_fld4,busiinvcode ) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=moveAlready',
            data: { checkicode, scode, sub_fld4,busiinvcode  },
            method: 'POST',
            noLoading: true
        })
    },

    getYiCangDanChu_Saoma(wcode, skuno, checkicode, sdate, sub_fld3,busiinvcode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=scanMove',
            data: { wcode, skuno, checkicode, sdate, sub_fld3,busiinvcode },
            method: 'POST',

        })
    },

    //盘点

    getPanDianDan() {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=inventoryList',
            data: {},
            method: 'POST'
        })
    },

    getPanDianDan_DaiSaoMa(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=toBeInventory',
            data: { checkicode },
            method: 'POST',
            noLoading: true
        })
    },
    getPanDianDan_YiSaoMa(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=inventoryAlready',
            data: { checkicode },
            method: 'POST',
            noLoading: true
        })
    },
    getPanDianDan_PanYing(checkicode) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=inventoryProfitList',
            data: { checkicode },
            method: 'POST',
            noLoading: true
        })
    },

    getPanDian_Saoma(map) {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=scanInventory',
            data: map,
            method: 'POST',

        })
    },

    /**
     * 获取堆场
     */
    getPdaMenu: (token) => {
        return request({
            url: '/snsoft_guanyang/pda/pdapost.jsp?type=getPdaMenu',
            data: { token },
            method: 'POST'
        })
    },











}